package com.tjy.farmer.service.impl;

import java.util.List;
import com.tjy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjy.farmer.mapper.AreaBoundaryMapper;
import com.tjy.farmer.domain.AreaBoundary;
import com.tjy.farmer.service.IAreaBoundaryService;

/**
 * 区域边界点Service业务层处理
 * 
 * @author tjy
 * @date 2025-09-08
 */
@Service
public class AreaBoundaryServiceImpl implements IAreaBoundaryService 
{
    @Autowired
    private AreaBoundaryMapper areaBoundaryMapper;

    /**
     * 查询区域边界点
     * 
     * @param id 区域边界点主键
     * @return 区域边界点
     */
    @Override
    public AreaBoundary selectAreaBoundaryById(Long id)
    {
        return areaBoundaryMapper.selectAreaBoundaryById(id);
    }

    /**
     * 查询区域边界点列表
     * 
     * @param areaBoundary 区域边界点
     * @return 区域边界点
     */
    @Override
    public List<AreaBoundary> selectAreaBoundaryList(AreaBoundary areaBoundary)
    {
        return areaBoundaryMapper.selectAreaBoundaryList(areaBoundary);
    }

    /**
     * 新增区域边界点
     * 
     * @param areaBoundary 区域边界点
     * @return 结果
     */
    @Override
    public int insertAreaBoundary(AreaBoundary areaBoundary)
    {
        areaBoundary.setCreateTime(DateUtils.getNowDate());
        return areaBoundaryMapper.insertAreaBoundary(areaBoundary);
    }

    /**
     * 修改区域边界点
     * 
     * @param areaBoundary 区域边界点
     * @return 结果
     */
    @Override
    public int updateAreaBoundary(AreaBoundary areaBoundary)
    {
        return areaBoundaryMapper.updateAreaBoundary(areaBoundary);
    }

    /**
     * 批量删除区域边界点
     * 
     * @param ids 需要删除的区域边界点主键
     * @return 结果
     */
    @Override
    public int deleteAreaBoundaryByIds(Long[] ids)
    {
        return areaBoundaryMapper.deleteAreaBoundaryByIds(ids);
    }

    /**
     * 删除区域边界点信息
     * 
     * @param id 区域边界点主键
     * @return 结果
     */
    @Override
    public int deleteAreaBoundaryById(Long id)
    {
        return areaBoundaryMapper.deleteAreaBoundaryById(id);
    }
}
